package com.senyint.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository("pacsDao")
public class PacsDaoImpl implements PacsDao {

	// mybatis
	@Autowired
	protected SqlSession sqlSessionXaPacs;

	public SqlSession getSqlSessionXaPacs() {
		return sqlSessionXaPacs;
	}

	public void setSqlSessionXaPacs(SqlSession sqlSessionXaPacs) {
		this.sqlSessionXaPacs = sqlSessionXaPacs;
	}

	@Override
	public List<Map<String, Object>> getNoPayAndRefund(Map<String,Object> param) {
		// TODO Auto-generated method stub
		return sqlSessionXaPacs.selectList("pacs.selectNoPayAndRefund",param);
	}

	@Override
	public void updateDisable( Map<String, Object> param) {
		// TODO Auto-generated method stub
		sqlSessionXaPacs.update("pacs.updateDisable",param);
	}

	@Override
	public void insertPay(Map<String, Object> param) {
		// TODO Auto-generated method stub
		sqlSessionXaPacs.insert("pacs.insertPay", param);
	}

	@Override
	public void insertRefund(Map<String, Object> param) {
		// TODO Auto-generated method stub
		sqlSessionXaPacs.insert("pacs.insertRefund", param);
	}

	@Override
	public void deletePay() {
		sqlSessionXaPacs.delete("pacs.deletePay");
	}

	@Override
	public void deleteRefund() {
		sqlSessionXaPacs.delete("pacs.deleteRefund");
	}

	@Override
	public void insertDayendRecord(Map<String, Object> param) {
		sqlSessionXaPacs.insert("pacs.insertDayendRecord", param);
	}

}
